//新增活动表单数据
export enum ActivityStatus {
    planning = '待审核', // 待审核
    ongoing = '已通过', // 已通过
    rejected = '已驳回' //已拒绝
}
export interface ActivityFormData {
    activityId?:number;
    name: string;  //活动名称
    activityDate: Date | string;  //活动时间
    content: string;  //活动内容
    participants: number;  //活动人数
    location: string;  //活动地点
    status: ActivityStatus;  //活动状态
    rejectReason?: string;
}

// 接口Api
import axios from '@/API/axios/axios'
// 添加活动Api
export function addActivityApi(activityFormData: ActivityFormData) {
    return axios.post('/activity/addActivity', activityFormData)
}
// 获取所有活动列表Api
export function getAllActivityApi() {
    return axios.get('/activity/getAllActivity')
}
// 通过审核Api
export function passActivityStatus(params: {
    activityId: number
    status: ActivityStatus
}) {
    return axios.post('/activity/passStatus', params)
}
// 驳回审核Api
export function rejectActivityStatus(params: {
    activityId: number
    status: ActivityStatus
    rejectReason:string
}) {
    return axios.post('/activity/rejectStatus', params)
}
// 筛选状态返回活动列表
export function getActivityByStatusApi(params: {
    status:String
}) {
    return axios.get('/activity/getActivityListByStatus', { params })
}
